package com.drawu.drawuspring.controller;


import com.drawu.drawuspring.domain.Result;
import com.drawu.drawuspring.service.ICollectRecordService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 收藏记录表 前端控制器
 * </p>
 *
 * @author hui
 * @since 2024-10-12
 */
@RestController
@RequestMapping("/collects")
@RequiredArgsConstructor
@Tag(name = "收藏记录", description = "收藏记录相关接口")
public class CollectRecordController {

    private final ICollectRecordService collectRecordService;

    @Operation(summary = "批量查询``收藏记录``状态")
    @GetMapping("/list")
    public Result<Set<Integer>> getCollectsRecordList(@RequestParam("postIds") List<Integer> postIds) {
        return Result.success(collectRecordService.getCollectsRecordList(postIds));
    }

}
